#
# qmake project file for QtWi
#
# (C) 2009 Ultratronik Entwicklungs GmbH
# 	- License: GPL
# 	- Author: Soeren Wellhoefer <soeren.wellhoefer@gmx.net>
#

# General

VERSION = 0.1
TEMPLATE = lib
CONFIG = staticlib qt debug
DESTDIR = lib
TARGET = qtwi

# Defines

DEFINES *= $$(QTWI_TYPE)

isEmpty(DEFINES) {
	error(Environment variable QTWI_TYPE must be set to QTWI_QT or QTWI_TNW)
}

DBG = $$(DEBUG)
contains(DBG, YES) {
	DEFINES *= DEBUG
	QMAKE_CXXFLAGS *= -O0 -Wall --debug -g
}

DEFINES *= QTWI_VERSION=$$VERSION


# Includes/Libs

DEPENDPATH += . include src include/qtwi/core include/qtwi
INCLUDEPATH += include include/qtwi include/qtwi/core
LIBS = -lclasslib -ltnW -lnano-X -lmwengine -lmwdrivers -lmxml -lmwfonts -lfreetype

# Files

HEADERS += include/QtWi \
	   include/QtWiAux \
	   include/QtWiTmpl \
	   include/qtwi/common.hpp \
           include/qtwi/iapplication.hpp \
           include/qtwi/iwidgets.hpp \
           include/qtwi/core/iiapplication.hpp \
           include/qtwi/core/iicommon.hpp \
           include/qtwi/core/iifactory.hpp \
           include/qtwi/core/iiwidgets.hpp \
	   include/qtwi/ithread.hpp


SOURCES += src/iiapplication.cpp src/iifactory.cpp src/iiwidgets.cpp src/itemplates.cpp src/ithread.cpp

# Installation

# Environment variable INSTALL= for installation prefix
INSTDIRECT=$$(INSTALL)
isEmpty(INSTDIRECT) {
	INSTDIRECT = /usr/
}

target.path = $$INSTDIRECT/lib
INSTALLS *= target

includes.path = $$INSTDIRECT/include/qtwi
includes.files = include/qtwi/*.hpp
INSTALLS *= includes

maininclude.path = $$INSTDIRECT/include
maininclude.files = include/QtWi include/QtWiAux include/QtWiTmpl
INSTALLS *= maininclude

coreincludes.path = $$INSTDIRECT/include/qtwi/core
coreincludes.files = include/qtwi/core/*.hpp
INSTALLS *= coreincludes

